<?php

class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
{
    protected $_front = null;

    protected function _initViewController()
    {        
        $this->bootstrap('FrontController');
        $this->_front = $this->getResource('FrontController');
    }

    /**
     * Init Autoloader
     */
    protected function _initAutoloader()
    {
        Zend_Loader_Autoloader::getInstance()
        ->setFallbackAutoloader(true)
        ->suppressNotFoundWarnings(false);
    }
    
    protected function _initPlugins()
    {        
        $this->_front->registerPlugin(new Core_Plugin_System());
    }

    protected function _initView()
    {
        $view = Zend_Layout::startMvc()->getView();
        $view->addBasePath(APPLICATION_PATH . '/layouts');
        $view->assign('config', Core_Global::getConfig());
        $view->assign('user', Core_Session::get('user'));        
    }        

}